﻿<!DOCTYPE html>
<html lang="en">
<#include "../include/resource-head.ftl"/>
<body>
<#assign active='monthList'/>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="form-search">
                            <form role="form" class="form-inline clearfix" id="form" action="">
                                <div class="input-group col-xs-3">
                                    <span class="input-group-addon">时间</span>
                                    <input type="text" class="form-control form_datetime" readonly data-date-format="yyyy-mm" name="month" value="${month!}">
                                </div>
                            </form>
                            <div class="form-tool btn-group">
                                <button class="btn btn-sm btn-success" form="form">
                                    <i class="icon-search"></i>搜索
                                </button>

                                <button class="btn btn-sm btn-warning" form="form" name="export">
                                    <i class="icon-download-alt"></i>导出
                                </button>
                            </div>
                            <div class="pull-right" style="padding-right: 15px">
                                <span>共有${pageInfo.total}单订单</span>&nbsp;&nbsp;&nbsp;<span>共收益${money?string('#0.00')}元</span>
                            </div>
                        </div>
                        <div class="table-responsive">
                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>订单号</th>
                                    <th>礼品名</th>
                                    <th>用户名</th>
                                    <th>数量</th>
                                    <th>总价</th>
                                    <th>发起时间</th>
                                    <th>支付时间</th>
                                    <th>发货时间</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <#list pageInfo.list as item>
                                <tr>
                                    <td>${item.orderno}</td>
                                    <td>${item.goodsName}</td>
                                    <td>${item.username}</td>
                                    <td>${item.count}</td>
                                    <td>${item.total?string('#0.00')}</td>
                                    <td>${item.addtime?string('yyyy-MM-dd HH:mm:ss')}</td>
                                    <td><#if item.paytime??>${item.paytime?string('yyyy-MM-dd HH:mm:ss')}<#else>未支付</#if></td>
                                    <td><#if item.sendtime??>${item.sendtime?string('yyyy-MM-dd HH:mm:ss')}<#else>未发货</#if></td>
                                    <td>
                                        <#if 1 == item.status!>
                                            <span class="label label-sm label-success">待支付</span>
                                        <#elseif item.status == 2>
                                            <span class="label label-sm label-warning">代发货</span>
                                        <#elseif item.status == 3>
                                            <span class="label label-sm label-warning">代收货</span>
                                        <#elseif item.status == 4>
                                            <span class="label label-sm label-warning">代评价</span>
                                        <#elseif item.status == 5>
                                            <span class="label label-sm label-warning">完成</span>
                                        </#if>
                                    </td>

                                    <td>
                                        <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                                            <#if item.status == 2>
                                                <a class="btn btn-xs btn-success" href="/admin/order/sendGoods/${item.id}">发货</a>
                                            </#if>
                                        </div>
                                    </td>
                                </tr>
                                </#list>
                                </tbody>
                            </table>
                        <#include "../include/table-page.ftl"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<#include "../include/resource-script.ftl"/>
<script>
    $(".form_datetime").datetimepicker({
        format: 'yyyy-mm',
        autoclose: true,
        startView: 'year',
        minView:'year',
        maxView:'decade',
        language:  'zh-CN'
    });
</script>

</html>

